Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

135 calc_* functions should output NAs is there is no available data #141

Merged

Conversation

CeresBarros
Copy link
Member

#135

Tests for calc_* functions could evolve into comparing with data from ClimateBC. This is a start, though.

To be continued...

@CeresBarros
Copy link
Member Author

CeresBarros commented Dec 19, 2023

partially addresses #133

@CeresBarros
Copy link
Member Author

@kdaust it seems check are failing because the server can't be reached. Any clues as to what might be happening?

@kdaust
Copy link
Collaborator

kdaust commented Dec 19, 2023

Should be fixed now - not sure why but postgres quit. Has been happening if someone uses the old climRdev and requests a large area.

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (ee722b6) 5.48% compared to head (b36b5cb) 46.14%.
Report is 10 commits behind head on devl.

❗ Current head b36b5cb differs from pull request most recent head f61be14. Consider uploading reports for the commit f61be14 to get more accurate results

Files Patch % Lines
R/helper-testInit.R 0.00% 11 Missing ⚠️
R/downscale.R 60.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devl     #141       +/-   ##
==========================================
+ Coverage   5.48%   46.14%   +40.66%     
==========================================
  Files         21       22        +1     
  Lines       1659     1688       +29     
==========================================
+ Hits          91      779      +688     
+ Misses      1568      909      -659     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CeresBarros
Copy link
Member Author

@kdaust the checks keep failing due to server issues. Can you check the failing test code and see if I'm doing anything wrong that could be triggering server issues?

@kdaust
Copy link
Collaborator

kdaust commented Dec 19, 2023

Do you know which tests are causing the fail? Is it the calc_* function test? Also, would it make sense to focus on the main climr_downscale function, instead of using the underlying functions directly? Although I suppose it doesn't matter for testing the calculations

@kdaust
Copy link
Collaborator

kdaust commented Dec 19, 2023

I tried running the test and it ran fine - I wonder if the problem is being caused by multiple instances trying to pull from the database at the same time? You're downloading the entire prism surface of BC, so that's fairly large. Maybe try using a much smaller bounding box for the tests and see if that works?

@CeresBarros
Copy link
Member Author

It is the second test that fails. As to the size of the bbox, I was using what was available in Example_Run.R. If you have a smaller example, do send it along ;)

@CeresBarros CeresBarros merged commit 95094e2 into bcgov:devl Dec 20, 2023
10 checks passed
@CeresBarros CeresBarros deleted the 135-calc_-functions-should-output-nas-is branch January 3, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants